home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / ColorSync 2.5.1 SDK / Sample Code / CSDemo 2.5 / ShellSources / qdPrintUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-09-09  |  1.7 KB  |  61 lines  |  [TEXT/CWIE]

  1.  
  2. #ifndef _QDPRINTING_
  3. #define _QDPRINTING_
  4.  
  5.  
  6. #ifndef __PRINTING__
  7. #include <Printing.h>
  8. #endif
  9.  
  10.  
  11. /**\
  12. |**| ==============================================================================
  13. |**| PUBLIC DEFINES
  14. |**| ==============================================================================
  15. \**/
  16. #define r_printHdlType    'PREC'
  17. #define noPrinterChosenErr    42        // OK to use 42, it's obsolete.
  18.  
  19.  
  20. /**\
  21. |**| ==============================================================================
  22. |**| PUBLIC TYPEDEFS
  23. |**| ==============================================================================
  24. \**/
  25. typedef struct QDPrintLoopParams
  26. {
  27.     THPrint         hPrint ;
  28.     WindowRef        window ;        // the window to print from
  29.     GrafPtr            printingPort ;    // the dprot to print into
  30.     long            firstPage ;
  31.     long            lastPage ;
  32.     long            currentPage ;
  33.     DialogPtr        statusDialog ;
  34.     
  35. } QDPrintLoopParamsRec, *QDPrintLoopParamsPtr, **QDPrintLoopParamsHdl ;
  36.  
  37.  
  38. /**\
  39. |**| ==============================================================================
  40. |**| PUBLIC FUNCTION PROTOTYPES
  41. |**| ==============================================================================
  42. \**/
  43. OSErr        QDPrinting_available    ( void ) ;
  44.  
  45. OSErr        GetDefaultTHPrint        ( THPrint *hPrint ) ;
  46. OSErr        LoadResourceTHPrint        ( THPrint *hPrint, FSSpec *spec ) ;
  47. OSErr        SaveResourceTHPrint        ( THPrint hPrint, FSSpec *spec ) ;
  48.  
  49. OSErr        QDGetPageSize            ( THPrint hPrint, Rect *pageRect ) ;
  50.  
  51. OSErr        QDStyleDlog                ( THPrint hPrint ) ;
  52. OSErr        QDJobDlog                ( THPrint hPrint ) ;
  53.  
  54. OSErr        QDPrintLoopBegin        ( QDPrintLoopParamsPtr params ) ;
  55. OSErr        QDPrintLoopPageBefore    ( QDPrintLoopParamsPtr params ) ;
  56. OSErr        QDPrintLoopPageAfter    ( QDPrintLoopParamsPtr params ) ;
  57. OSErr        QDPrintLoopEnd            ( QDPrintLoopParamsPtr params ) ;
  58.  
  59.  
  60. #endif
  61.